﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Galdino.Master" CodeBehind="Carrinho.aspx.vb" Inherits="Galdino.MCarrinho" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <table style="width:100%;">
        <tr>
            <td><asp:HyperLink ID="hlContinuarComprando" runat="server" NavigateUrl="~/Interface/Produtos.aspx">Continuar Comprando</asp:HyperLink></td>
            <td><asp:LinkButton ID="lbFinalizarCompra" runat="server">Finalizar Compra</asp:LinkButton></td>
        </tr>
    </table>
    <asp:GridView ID="grvCarrinho" runat="server" AutoGenerateColumns="False" ShowFooter="True">
        <Columns>
            <asp:ButtonField CommandName="Remover" Text="Remover" />
            <asp:BoundField DataField="pNome" HeaderText="Nome" />
            <asp:BoundField DataField="pDescricao" HeaderText="Descrição" />
            <asp:BoundField DataField="pValorVenda" HeaderText="Valor" />
            <asp:BoundField DataField="pQuantidade" HeaderText="Qtde" />
            <asp:ButtonField ButtonType="Button" CommandName="Adcionar" Text="+" />
            <asp:ButtonField ButtonType="Button" CommandName="Subtrair" Text="-" />
            <asp:TemplateField HeaderText="Sub Total">
                <ItemTemplate>
                    <asp:Label ID="lblSubTotal" runat="server" Text='<%# Eval("pValorVenda") * Eval("pQuantidade")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Código do Produto" Visible="False">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("pCodigo")%>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblCodProduto" runat="server" Text='<%# Bind("pCodigo") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
</asp:Content>
